package com.wza.designPattern.DecoratorPattern;

import com.wza.designPattern.AbstructFactoryPattern.Circle;
import com.wza.designPattern.FactoryPattern.Rectangle;
import com.wza.designPattern.interfaces.Shape;

/**
 * <一句话功能简述>
 * <p>
 * <功能详细描述>
 *
 * @author weizhian
 * @version [版本号, 2018/11/24]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class DecoratorPatternDemo
{
    public static void main(String[] args) {

        Shape circle = new Circle();

        Shape redCircle = new RedShapeDecorator(new Circle());

        Shape redRectangle = new RedShapeDecorator(new Rectangle());
        System.out.println("Circle with normal border");
        circle.draw();

        System.out.println("\nCircle of red border");
        redCircle.draw();

        System.out.println("\nRectangle of red border");
        redRectangle.draw();
    }
}
